"""
所有用例基类
"""
import unittest
from time import sleep
from tools.utils import chrome
from config.config import HOST
from tools.cookie import get_cookie


# 获取用例级别预处理、用例级别清理环境方法

class BaseCase(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = chrome()
        self.driver.get("http://{}".format(HOST))
        self.driver.add_cookie(get_cookie())




    def tearDown(self) -> None:
        sleep(2)
        self.driver.quit()
